<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>授权</title>
</head>

<body style="margin: 0px">
<div class="container">
  <div class="grant-container">
    <div class="title">请求授权</div>
    <div class="inner-container">
      <h3 th:text="${clientId}+' 请求授权，该应用将获取你的以下信息'"></h3>
      <h3 th:text="${clientId}+' 跳转到' + ${redirectUri}"></h3>
      <p>昵称，头像和性别</p>
      授权后表明你已同意 <a  href="#boot" style="color: #409EFF"> 服务协议</a>
      <form method="post" action="/oauth/authorize">
        <input type="hidden" name="user_oauth_approval" value="true">
        <!--    <input type="hidden" name="_csrf" th:value="${_csrf.getToken()}"/>-->
        <div th:each="item:${scopes}">
          <input type="radio" th:name="'scope.'+${item}" value="true" hidden="hidden" checked="checked"/>
        </div>
        <button class="btn" type="submit"> 同意/授权</button>
      </form>
    </div>
  </div>
</div>
<style>

  html{
    padding: 0px;
    margin: 0px;
  }

  .container {
    width: 100vw;
    height: 100vh;
    display: grid;
    place-items: center;
  }

  .grant-container {
    width: 600px;
    height: 500px;
    border-radius: 20px;
    box-shadow: 1px 1px 10px #888888;
    padding: 40px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .title {
    background-color: #409EFF;
    height: 40px;
    width: 100%;
    padding-left: 20%;
    padding-right: 20%;
    box-sizing: border-box;
    color: white;
    line-height: 50px;
    font-size: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .title-left{
    float: right;
  }
  .title-right{
    float: left;
  }
  .title-left a{
    color: white;
  }
  .inner-container{
    clear: both;
    text-align: center;
  }
  .btn {
    width: 350px;
    height: 40px;
    line-height: 35px;
    cursor: pointer;
    margin-top: 20px;
    border-radius: 3px;
    background-color: #409EFF;
    color: white;
    border: none;
    font-size: 15px;
  }
</style>
</body>
</html>
